#include <iostream>
using namespace std;

int main() {
    int n = 1;
    for (int i = 0; i < 119; i++) {
        n *= 7;
        n %= 306783353;
    }
    cout << "ans=" << n << endl;
    return 0;
}
